<?php

declare (strict_types=1);
namespace App\Model;

/**
 * @property int $id 
 * @property int $parent_id 父级分类ID
 * @property string $name 分类名称
 * @property string $slug 分类标识
 * @property ?string $description 分类描述
 * @property ?string $icon 分类图标
 * @property int $order 排序
 * @property int $article_count 文章数量
 * @property \Carbon\Carbon $created_at 
 * @property \Carbon\Carbon $updated_at 
 */
class Category extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'categories';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = ['id', 'parent_id', 'name', 'slug', 'description', 'icon', 'order', 'article_count', 'created_at', 'updated_at'];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = ['id' => 'integer', 'parent_id' => 'integer', 'order' => 'integer', 'article_count' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
}